package com.david.tvhelperapp

import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.view.View
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

    var handler:Handler = Handler()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        findViewById<View>(R.id.test).setOnClickListener {
            Thread() {
                kotlin.run {
//                    UdpReceiver.startReceive()
//                    TvUdpSend.sendUdpData("hello udp!")
                    val intent = Intent(this@MainActivity, TvMsgService::class.java)
                    intent.putExtra("name", "test")
                    startService(intent)
                }
            }.start()
        }

    }

    override fun onResume() {
        super.onResume()
    }
}
